package cn.sciento.farm.devicemanager.service.impl;

import cn.sciento.farm.devicemanager.dao.entity.DevInsectSituationLamp;
import cn.sciento.farm.devicemanager.dao.entity.DevInsectSituationLampHistory;
import cn.sciento.farm.devicemanager.dao.mapper.DevInsectSituationLampHistoryMapper;
import cn.sciento.farm.devicemanager.dao.mapper.DevInsectSituationLampMapper;
import cn.sciento.farm.devicemanager.service.DevInsectSituationLampHistoryService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Walton
 * @since 2020/8/21 17:09
 */
@Service
public class DevInsectSituationLampHistoryServiceImpl implements DevInsectSituationLampHistoryService {

    @Autowired
    DevInsectSituationLampHistoryMapper insectLampHistoryMapper;

    @Override
    public int insert(DevInsectSituationLampHistory insectLampHistory) {
        return insectLampHistoryMapper.insert(insectLampHistory);
    }

    @Override
    public List<DevInsectSituationLampHistory> getHistory(int insectId, Long beginTime, Long endTime) {
        List<DevInsectSituationLampHistory> lampHistoryList = insectLampHistoryMapper.getHistory(insectId, beginTime, endTime);
        return lampHistoryList;
    }


}
